<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!Doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>修改个人资料</title>
    <%@include file="/common/header.jsp" %>
    <link rel="stylesheet" href="css/public.css" media="all" />
</head>

<body class="layui-layout-body">

    <%@include file="/common/admin_top.jsp" %>
    <%@include file="/common/admin_left.jsp" %>
    <div style="margin:50px 250px;">
        <form class="layui-form layui-row" action="/user/edit" method="POST">
            <%--<div class="layui-col-md3 layui-col-xs12">--%>
            <%--<div class="layui-upload-list">--%>
            <%--<img src="http://www.qq1234.org/uploads/allimg/150331/8_150331165614_2.jpg" class="layui-nav-img">--%>
            <%--</div>--%>
            <%--<button type="button" class="layui-btn layui-btn-primary userFaceBtn">换头像，换心情</button>--%>
            <%--</div>--%>

            <div class="layui-form-item">
                <input type="hidden" name="id" value="${currentUser.id}">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-inline">
                    <input type="text" name="userName" value="${currentUser.userName}" required lay-verify="required|username" placeholder="请输入用户名" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">手机号</label>
                <div class="layui-input-inline">
                    <input type="text" name="phone" value="${currentUser.phone}" required lay-verify="required|phone|number" placeholder="请输入手机号" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input type="password" name="password" value="${currentUser.password}" required lay-verify="required|pass" placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block">
                    <c:if test="${currentUser.sex eq '男'}">
                        <input type="radio" name="sex" value="男" title="男" checked>
                        <input type="radio" name="sex" value="女" title="女">
                    </c:if>
                    <c:if test="${currentUser.sex eq '女'}">
                        <input type="radio" name="sex" value="男" title="男">
                        <input type="radio" name="sex" value="女" title="女" checked>
                    </c:if>
                    <c:if test="${currentUser.sex eq null}">
                        <input type="radio" name="sex" value="男" title="男">
                        <input type="radio" name="sex" value="女" title="女">
                    </c:if>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">专业</label>
                <div class="layui-input-inline">
                    <input type="text" name="major" value="${currentUser.major}" placeholder="请输入专业，可选填" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">邮箱</label>
                <div class="layui-input-inline">
                    <input type="text" name="email" value="${currentUser.email}" placeholder="请输入常用邮箱，可选填" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">宿舍区</label>
                <div class="layui-input-inline">
                    <select name="dormitory">
                        <option value="">请选择所在宿舍区，可选填</option>
                        <option value="泰山区">泰山区</option>
                        <option value="华山区">华山区</option>
                        <option value="启林区">启林区</option>
                        <option value="六一区">六一区</option>
                        <option value="嵩山区">嵩山区</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">保存</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>


<script>
    layui.use(['form','layer','upload','laydate'],function(){
        form = layui.form;
        $ = layui.jquery;
        var layer = parent.layer === undefined ? layui.layer : top.layer,
            upload = layui.upload,
            laydate = layui.laydate;
    })
</script>
</body>
</html>